package com.example.lastwork.dao;

import com.example.lastwork.common.dao.LogicDAO;
import com.example.lastwork.entity.LineItem;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface LineItemDao extends LogicDAO<LineItem, Long> {
    @Query("SELECT li FROM LineItem li WHERE li.orders.id = :ordersId")
    List<LineItem> getLineItemsByOrdersId(@Param("ordersId") Long ordersId);
}
